home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / scope / 051-075 / scopedisk70 / menumgr / menumanager.doc < prev    next >
Text File  |  1995-03-19  |  7KB  |  169 lines

  1.                         MenuManager v1.00 Documentation
  2.  
  3.                                    28-MAR-89
  4.  
  5.                                       by
  6.  
  7.                                  Dan R. Schenck
  8.  
  9.  
  10.      MenuManager is an ARexx program for creating a custom Workbench menu strip
  11. for launching programs and running system commands without typing entries from
  12. the CLI.  I wrote it mainly just to see how well something like this could be
  13. implemented using ARexx by William Hawes.  This program also makes extensive
  14. use of the Intuition interface and extensive functions found in the
  15. rexxarplib.library, version 2.1, by W. G. J. Langeveld.  ARexx coupled with the
  16. rexxarplib.library is sufficiently rich an environment to create a very
  17. elaborate and intelligent application.  However, speed of execution suffers in
  18. initially parsing the menu definition file used to create the custom menu
  19. strip.  I'm still working on it and may come up with vastly improved start-up
  20. times eventually.  The best thing to cure this problem might be a much speedier
  21. version of ARexx which is roomered to be in the making.
  22.  
  23.      To use MenuManager, you must have the ARP commands available in your C:
  24. directory (or somewhere in the current path).  In addition, you must set up the
  25. rexxarplib.library for ARexx to access.  The .zoo file you got these docs from
  26. should contain the following files:
  27.  
  28.                                 MenuManager.rexx
  29.  
  30.                                  MenuManager.def
  31.  
  32.                                  MenuManager.doc
  33.  
  34. After setting up the version 2.1 rexxarplib.library and making the ARP commands
  35. available, create a MenuManager.def file like the one in this archive (using
  36. your favorite programs) in the manner described below, and place it in the S:
  37. directory or the current directory you launch MenuManager.rexx from, and away
  38. you go.  A typical start-up sequence would be: 
  39.  
  40.                               arun rx MenuManager
  41.  
  42.      Optionally, you may use any name you like for the .def file.  To select a
  43. file that is not named MenuManager.def, start MenuManager with the parameter
  44. "-f" to bring up a file requestor which allows you to choose a .def file, like:
  45.  
  46.                              arun rx MenuManager -f
  47.  
  48.      Once MenuManager is initiated be PATIENT.  It is a tad slow parsing your
  49. .def file.  After that is complete, there are several menu choices builtin to
  50. MenuManager in addition to those you set up.  They are generally self-
  51. explanatory, but you probably want to avoid using the menu names "System" and
  52. "Options" to avoid confusion.  Using the items in the Options menu, you can
  53. change menus, set up a request for help about one of the menu items you entered
  54. or list the actions that will take place by selecting one of your items.
  55.  
  56.      Now, to the menu definition file description!
  57.  
  58.      First, any line without the appropriate MenuManager "trigger" as the first
  59. nonblank character is considered a comment (Tip - don't use too many comments
  60. because of initial slow processing speed in parsing file).  Triggers are as
  61. follows:
  62.  
  63.      "=" - Immediately preceeds a MenuManager command.  Commands are:
  64.  
  65.                 "MENU"    - Start a new menu.
  66.                 "ITEM"    - New item under current menu.
  67.                 "SUBITEM" - New subitem under current item.
  68.  
  69.      "&" - Immediately preceeds a menu, item or subitem name field.
  70.  
  71.      "." - Immediately preceeds an item or subitem action field.
  72.  
  73.      "$" - Immediately preceeds an item or subitem help field.
  74.  
  75.      The rules are simple.  Any command, name, action or help field starts with
  76. the appropriate trigger from the list above (leading blanks before trigger
  77. ignored; blanks following trigger only allowed for name, action and help
  78. fields, and form part of the field).  The appropriate heirarchy for statements
  79. is:
  80.  
  81.            menu command
  82.            menu name
  83.             item command
  84.             item name
  85.             action  <==== multiple fields allowed
  86.             help    <==== multiple fields allowed and inclusion is optional
  87.             item command
  88.             item name
  89.              subitem command
  90.              subitem name
  91.              action
  92.            menu command
  93.            menu name
  94.             etc...
  95.  
  96.      Name fields may include an "@" at the end of the field, followed by a
  97. single letter to be used as a hot key  (ex. - &Access! @A).  The hot key letter
  98. must be unique (including the "Q" and "H" used in the predefined menus).
  99.  
  100.      You may have as many action fields as necessary associated with an item or
  101. subitem. Items with subitems may not have action fields associated with the
  102. item.  All action fields should be valid CLI programs or commands.  Multiple
  103. action fields are treated as CLI statements which will be executed using the
  104. "execute" command.
  105.  
  106.      Action fields may contain special "parameter fields" which initiate
  107. prompting.  Parameter fields are enclosed in "[]"s.  Bracketed fields may
  108. contain the following:
  109.  
  110.           !text      - Simple prompt for user input, where "text" is the
  111.                        requestor prompt string message.
  112.  
  113.                        ex. - [!Enter Directory Name]
  114.  
  115.           %directory - Prompt user for file using file requestor pointing,
  116.                        optionally, to a "directory".  !text may be included in
  117.                        field to serve as requestor prompt string message.
  118.  
  119.                        ex. - [!Select WP File%Work:letters]
  120.  
  121.      Thus, an empty parameter field (ex. - []) or one with only a !text (ex. -
  122. [!Enter Optional parameters], will generate a simple string input requestor,
  123. while one including a %directory (ex. - [%VD0:]) generates a file requestor.
  124.  
  125.      Double !s or %s in an action parameter field indicate the respective ! or
  126. % symbol is to be treated as part of the text (ex. - [!Enter a %% to calculate]
  127. or [!Enter a file!!%]).
  128.  
  129.      Parameters may also be nested, i.e. [!Select a file%[!Enter a directory]].
  130. Fields are parsed from right to left; so, in the example, a directory is
  131. requested from the user which will then be used as the current directory in
  132. the file requestor.
  133.  
  134.      As many help fields as appropriate may optionally be entered for an item
  135. or subitem.  Each field will be a separate line of output in the ensuing help
  136. message.  However, "\"s may be included in one help field to create multiple
  137. lines of output (ex. - $This is line one\This is line two).
  138.  
  139.      Below is a simple example menu:
  140.  
  141. =MENU
  142. &Utilities 
  143.  =ITEM
  144.  &Edit a File @E
  145.  .arun ed [!Select File To Edit%]
  146.  =ITEM
  147.  &Type a File @T
  148.  .type [!Select File To Type%]
  149. =MENU
  150. &Processes 
  151.  =ITEM
  152.  &Start New CLI   @C
  153.  .newcli >NIL:
  154.  &Start New Shell @S
  155.  .newshell >NIL: NEWCON:0/12/320/100/MMgrShell
  156.  
  157.      For a more complex example, see the MenuManager.def file included in this
  158. archive.
  159.  
  160.      Please contact me at the address below with bug reports, comments, etc.:
  161.  
  162.                                 Dan R. Schenck
  163.                                 7010 E. 77th Place
  164.                                 Tulsa, Ok 74133
  165.  
  166.                                 (918) 492-0523
  167.  
  168.                                 GEnie: D.SCHENCK
  169.